home *** CD-ROM | disk | FTP | other *** search
/ Winzipper / Winzipper_ISO.iso / nt4.0 server / DRVLIB.NIC / NE2K.ISA / OEMSETUP.INF < prev   
INI File  |  1996-07-31  |  27KB  |  733 lines

  1. ;***********************************************************************
  2. ; Microsoft Windows NT Driver Library
  3. ;
  4. ; OEMSETUP.INF
  5. ;       NE2000 Compatible ISA Adapter Setup for NT 3.51
  6. ;
  7. ;   Jun 28 1995  David Lao  Initial version
  8. ;*******************************************************************************
  9. [Identification]
  10.     OptionType = NetAdapter
  11.  
  12. [PlatformsSupported]
  13.     ISA
  14.     EISA
  15.  
  16. [Options]
  17.     IBMISAETHER
  18.     DLINKDE220
  19.     LINKSYSE16
  20.  
  21. [OptionsTextENG]
  22.     IBMISAETHER       = "IBM ISA Ethernet Adapter"
  23.     DLINKDE220       = "D-Link DE-220 ISA Ethernet Adapter"
  24.     LINKSYSE16       = "Linksys Ether16 LAN Card"
  25.  
  26. [FileConstants]
  27. UtilityInf      = "UTILITY.INF"
  28. ParamInf        = "NCPARAM.INF"
  29. subroutineinf   = "SUBROUTN.INF"
  30. SoftwareType    = "driver"
  31. Exit_Code       = 0
  32. NetEventDLL     = "%SystemRoot%\System32\netevent.dll"
  33. IoLogMsgDLL     = "%SystemRoot%\System32\IoLogMsg.dll"
  34. Manufacturer    = "Microsoft"
  35. ProductMajorVersion     = "3"
  36. ProductMinorVersion     = "51"
  37. ProductVersion  = $(ProductMajorVersion)"."$(ProductMinorVersion)
  38. ProductSoftwareName     = "NE2000"
  39. ProductSoftwareImagePath = "\SystemRoot\System32\drivers\ne2000.sys"
  40. NetRuleSoftwareType     = "ne2000Sys ndisDriver ne2000Driver"
  41. NetRuleSoftwareUse      = $(SoftwareType)
  42. NetRuleSoftwareBindForm = """Ne2000Sys"" yes no container"
  43. NetRuleSoftwareClass    = {"ne2000Driver basic"}
  44. NetRuleSoftwareBindable = {"ne2000Driver ne2000Adapter non exclusive 100"} 
  45. ProductHardwareName     = "NE2000"
  46. NetRuleHardwareType     = "ne2000 ne2000Adapter"
  47. NetRuleHardwareBindForm = " yes yes container"
  48. NetRuleHardwareClass    = {"ne2000Adapter basic"}
  49. ProductKeyName  = $(!NTN_SoftwareBase)"\"$(Manufacturer)"\"$(ProductSoftwareName)"\CurrentVersion"
  50. ParamKeyName    = $(!NTN_ServiceBase)"\"$(ProductHardwareName)"\Parameters"
  51.  
  52. [FileConstantsENG]
  53. ProCaption   = "Windows NT Setup"
  54. ProCancel    = "Cancel"
  55. ProCancelMsg = "Windows NT Networking is not correctly installed.  "+
  56.                "Are you sure you want to cancel copying files?"
  57. ProCancelCap = "Network Setup Message"
  58. ProText1     = "Copying:"
  59. ProText2     = "To:"
  60. FunctionTitle   = "Microsoft NE2000 ISA Card Setup"
  61. ProductSoftwareDescription      = "Microsoft NE2000 Adapter Driver"
  62. ProductSoftwareTitle            = "Microsoft NE2000 Adapter Driver"
  63. ProductHardwareIBMISAETHERDescription  = "IBM ISA Ethernet Adapter"
  64. ProductHardwareDLINKDE220Description    = "D-Link DE-220 Ethernet Adapter"
  65. ProductHardwareLINKSYSE16Description   = "Linksys Ether16 LAN Card"
  66. ProductHardwareIBMISAETHERTitle  = "IBM ISA Ethernet Adapter"
  67. ProductHardwareDLINKDE220Title    = "D-Link DE-220 Ethernet Adapter"
  68. ProductHardwareLINKSYSE16Title   = "Linksys Ether16 LAN Card"
  69. ShellCodeErrorTitle     = "Error: "$(FunctionTitle)
  70. ShellCodeErrorText      = "Shell Code Error."
  71. IRQList  = ^(NE2000IRQChoices, 1)
  72. IRQValues = ^(NE2000IRQChoices, 2)
  73. IOBaseAddrList = ^(NE2000IOBaseAddrChoices, 1)
  74. IOBaseAddrValues = ^(NE2000IOBaseAddrChoices, 2)
  75. NE2000IRQDefault = 3
  76. NE2000IOBaseAddrDefault = 9
  77.  
  78. [GeneralConstants]
  79. from      = ""
  80. to        = ""
  81. ExitCodeOk     = 0
  82. ExitCodeCancel = 1
  83. ExitCodeFatal  = 2
  84. KeyNull         = ""
  85. MAXIMUM_ALLOWED   = 33554432
  86. RegistryErrorIndex = NO_ERROR
  87. KeyProduct      = ""
  88. KeyParameters   = ""
  89. TRUE            = 1
  90. FALSE           = 0
  91. NoTitle            = 0
  92. ExitState   = "Active"
  93. OldVersionExisted = $(FALSE)
  94. DriverPath      = $(!STF_NTPATH)\drivers
  95.  
  96. [date]
  97.     Now = {} ? $(!LIBHANDLE) GetSystemDate
  98.  
  99. [Identify]
  100.     set !DebugOutputControl = 1
  101.     read-syms Identification
  102.     set Status     = STATUS_SUCCESSFUL
  103.     set Identifier = $(OptionType)
  104.     set Media      = #("Source Media Descriptions", 1, 1)
  105.     Return $(Status) $(Identifier) $(Media)
  106.  
  107. [ReturnOptions]
  108.     set !DebugOutputControl = 1
  109.     set Status        = STATUS_FAILED
  110.     set OptionList     = {}
  111.     set OptionTextList = {}
  112.     set LanguageList = ^(LanguagesSupported, 1)
  113.     Ifcontains(i) $($0) in $(LanguageList)
  114.         ifstr(i) $($1) == ""
  115.            goto returnoptions
  116.         endif
  117.         set PlatformList = ^(PlatformsSupported, 1)
  118.         Ifcontains(i) $($1) in $(PlatformList)
  119.            goto returnoptions
  120.         else
  121.            set Status = STATUS_NOTSUPPORTED
  122.            goto finish_ReturnOptions
  123.         endif
  124.     else
  125.         set Status = STATUS_NOLANGUAGE
  126.         goto finish_ReturnOptions
  127.     endif
  128. returnoptions = +
  129.     set OptionList     = ^(Options, 1)
  130.     set OptionTextList = ^(OptionsText$($0), 1)
  131.     set Status         = STATUS_SUCCESSFUL
  132. finish_ReturnOptions = +
  133.     Return $(Status) $(OptionList) $(OptionTextList)
  134.  
  135. [InstallOption]
  136.     set !DebugOutputControl = 1
  137.     set Option   = $($1)
  138.     set SrcDir   = $($2)
  139.     set AddCopy  = $($3)
  140.     set DoCopy   = $($4)
  141.     set DoConfig = $($5)
  142.     set LanguageList = ^(LanguagesSupported, 1)
  143.     Ifcontains(i) $($0) NOT-IN $(LanguageList)
  144.         Return STATUS_NOLANGUAGE
  145.     endif
  146.     set-subst LF = "\n"
  147.     read-syms GeneralConstants
  148.     read-syms FileConstants
  149.     read-syms DialogConstants$(!STF_LANGUAGE)
  150.     ifstr(i) $(!NTN_Origination) == "NCPA"
  151.         set Continue = $(OK)
  152.     endif
  153.     read-syms FileConstants$(!STF_LANGUAGE)
  154.     detect date
  155.     set-title  $(FunctionTitle)
  156.     set to   = Begin
  157.     set from = Begin
  158.     set CommonStatus = STATUS_SUCCESSFUL
  159.     EndWait
  160. Begin = +
  161.     Ifstr(i) $(!NTN_InstallMode) == deinstall
  162.         set StartLabel = removeadapter
  163.     else-Ifstr(i) $(!NTN_InstallMode) == Update
  164.         set StartLabel = UpgradeSoftware
  165.     else-Ifstr(i) $(!NTN_InstallMode) == bind
  166.         set StartLabel = bindingadapter
  167.     else-Ifstr(i) $(!NTN_InstallMode) == configure
  168.         set StartLabel = configureadapter
  169.         set CommonStatus = STATUS_REBOOT
  170.                 Ifstr(i) $(ProductKeyName) == $(!NTN_RegBase)
  171.                         Debug-Output "Cannot configure the Novell 2000 driver software."
  172.                         Shell $(UtilityInf),RegistryErrorString,CANNOT_CONFIGURE_SOFTWARE
  173.                         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  174.                                 Debug-Output "ShellCode error: cannot get an error string."
  175.                                 goto ShellCodeError
  176.                         endif
  177.                         set Error = $($R0)
  178.                         set from = end
  179.                         set to = end
  180.                         goto nonfatalinfo
  181.                 endif
  182.     else
  183.                 set StartLabel = installadapter
  184.                 set OEM_ABANDON_OPTIONS = {}
  185.                 set OEM_ABANDON_SOFTWARE = FALSE
  186.                 set OEM_ABANDON_ON = TRUE
  187.     endif
  188.  
  189.     set from = $(fatal)
  190.     set to = $(fatal)
  191.     goto $(StartLabel)
  192.  
  193. installadapter = +
  194.     OpenRegKey $(!REG_H_LOCAL) "" $(ProductKeyName) $(MAXIMUM_ALLOWED) KeyProduct
  195.     Ifstr $(KeyProduct) != $(KeyNull)
  196.         CloseRegKey $(KeyProduct)
  197.         ifstr(i) !(NTN_RegBase) == $(ProductKeyName)
  198.            Shell $(UtilityInf), VerExistedDlg, $(ProductSoftwareTitle),+
  199.                $(ProductVersion)
  200.            ifint $($ShellCode) != $(!SHELL_CODE_OK)
  201.                Debug-Output "ShellCode error: cannot get an error string."
  202.                goto ShellCodeError
  203.            endif
  204.            goto end
  205.         else
  206.            Shell $(UtilityInf), CardExistedDlg
  207.            ifint $($ShellCode) != $(!SHELL_CODE_OK)
  208.                Debug-Output "ShellCode error: cannot get an error string."
  209.                goto ShellCodeError
  210.            endif
  211.            ifstr(i) $($R1) != "OK"
  212.                set CommonStatus = STATUS_USERCANCEL
  213.                goto end
  214.            endif
  215.            set OldVersionExisted = $(TRUE)
  216.         endif
  217.     endif
  218.     Install "Install-Help"
  219.     set IRQValue = *($(IRQList), $(NE2000IRQDefault))
  220.     set IOBaseAddrValue = *($(IOBaseAddrList), $(NE2000IOBaseAddrDefault))
  221.     goto adapteroptions
  222. configureadapter = +
  223.     Ifstr $(KeyProduct) == $(KeyNull)
  224.         OpenRegKey $(!REG_H_LOCAL) "" $(!NTN_RegBase) $(MAXIMUM_ALLOWED) KeyProduct
  225.         Ifstr $(KeyProduct) == $(KeyNull)
  226.             set RegistryErrorIndex = CANNOT_FIND_COMPONENT_SERVICE
  227.             Debug-Output "Cannot find component product key"
  228.             goto fatalregistry
  229.         Endif
  230.     Endif
  231.     Debug-Output "INF: Shelling to FindService"
  232.     Shell $(UtilityInf) FindService, $(KeyProduct)
  233.     Ifint $($ShellCode) != $(!SHELL_CODE_OK)
  234.         Debug-Output "INF: FindService shell failure"
  235.         Goto ShellCodeError
  236.     Endif
  237.     Ifstr(i) $($R0) != NO_ERROR
  238.         Debug-Output "INF: FindService Shell error: "$($R0)
  239.         Goto fatalregistry
  240.     endif
  241.     set KeyParameters = $($R2)
  242.     CloseRegKey $($R1)
  243.     Ifstr $(KeyParameters) == $(KeyNull)
  244.         set RegistryErrorIndex = CANNOT_FIND_COMPONENT_SERVICE
  245.         Debug-Output "Cannot find component service"
  246.         goto fatalregistry
  247.     endif
  248.     set OldVersionExisted = $(TRUE)
  249.     set ValueName = ""
  250.     set ValueData = ""
  251.     set ValueStr  = ""
  252.     set ValueList = {}
  253.     EnumRegValue $(KeyParameters) ValueList
  254.  
  255.     ForListDo $(ValueList)
  256.         set ValueItem = $($)
  257.         set ValueName = *($(ValueItem),1)
  258.         set ValueData = *($(ValueItem),4)
  259.         Ifstr(i) $(ValueName) == "InterruptNumber"
  260.             set IRQValueIndex = $(ValueData)
  261.         else-ifstr(i) $(ValueName) == "IoBaseAddress"
  262.             set IOBaseAddrIndex = $(ValueData)
  263.         endif
  264.     EndForListDo
  265.  
  266.     set IRQValue = *($(IRQList), ~($(IRQValues),$(IRQValueIndex)))
  267.     ifstr(i) $(IRQValue) == ""
  268.     set IRQValue = *($(IRQList), 2)
  269.     endif
  270.  
  271.     set IOBaseAddrValue = *($(IOBaseAddrList), ~($(IOBaseAddrValues),$(IOBaseAddrIndex)))
  272.     ifstr(i) $(IOBaseAddrValue) == ""
  273.     set IOBaseAddrValue = *($(IOBaseAddrList), 1)
  274.     endif
  275.  
  276. adapteroptions = +
  277.     set from = adapteroptions
  278.     sethelpfile "ne2kisa.hlp" 100 100
  279.     read-syms FileDependentDlg$(!STF_LANGUAGE)
  280.     ui start "InputDlg"
  281.     ifstr(i) $(DLGEVENT) == "CONTINUE"
  282.                 set IRQValueIndex = $(Combo1Out)
  283.                 set IOBaseAddrIndex = $(Combo2Out)
  284.                 ui pop 1
  285.     else-ifstr(i) $(DLGEVENT) == "BACK"
  286.                 set CommonStatus = STATUS_USERCANCEL
  287.                 Debug-Output "Action: exit. Bye."
  288.                 ui pop 1
  289.                 goto end
  290.     else
  291.                 ui pop 1
  292.                 Debug-Output "Action: unknown. Bye."
  293.                 goto end
  294.     endif
  295. adapterverify =+
  296.         Goto skipoptions
  297. skipoptions =+
  298.     ifint $(OldVersionExisted) == $(TRUE)
  299.         ifstr(i) $(!NTN_InstallMode) == configure
  300.                 goto writeparameters
  301.         endif
  302.     endif
  303.     StartWait
  304.     ifint $(OldVersionExisted) == $(FALSE)
  305.         ifstr(i) $(!NTN_InstallMode) == "install"
  306.                 Ifstr(i) $(DoCopy) == "YES"
  307.                     Shell $(UtilityInf), DoAskSource, $(!STF_CWDDIR), $(SrcDir) YES
  308.                     Ifint $($ShellCode) != $(!SHELL_CODE_OK)
  309.                         Goto ShellCodeError
  310.                     Else-Ifstr(i) $($R0) == STATUS_FAILED
  311.                         Shell $(UtilityInf) RegistryErrorString "ASK_SOURCE_FAIL"
  312.                         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  313.                            goto ShellCodeError
  314.                         endif
  315.                         set Error = $($R0)
  316.                         Goto fatal
  317.                     Else-Ifstr(i) $($R0) == STATUS_USERCANCEL
  318.                         Goto successful
  319.                     Endif
  320.                     Set SrcDir = $($R1)
  321.                 Endif
  322.                 install "Install-Option"
  323.                 ifstr(i) $(STF_INSTALL_OUTCOME) != STF_SUCCESS
  324.                     Shell $(UtilityInf) RegistryErrorString "UNABLE_COPY_FILE"
  325.                     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  326.                         goto ShellCodeError
  327.                     endif
  328.                     set Error = $($R0)
  329.                     goto fatal
  330.                 endif
  331.         endif
  332.        Shell $(UtilityInf), AddSoftwareComponent, $(Manufacturer), +
  333.                         $(ProductSoftwareName), +
  334.                         $(ProductSoftwareName), +
  335.                         $(ProductSoftwareTitle), $(STF_CONTEXTINFNAME), +
  336.                         $(ProductSoftwareImagePath), "kernel", "NDIS", {}, "",+
  337.                         $(NetEventDLL)
  338.        Set OEM_ABANDON_SOFTWARE = TRUE
  339.        ifint $($ShellCode) != $(!SHELL_CODE_OK)
  340.         Debug-Output "ShellCode error"
  341.         goto ShellCodeError
  342.        endif
  343.        set RegistryErrorIndex = $($R0)
  344.        set KeyProduct      = $($R1)
  345.        Set SoftNetRulesKey = $($R2)
  346.        CloseRegKey $($R3)
  347.        CloseRegKey $($R4)
  348.        CloseRegKey $($R5)
  349.        Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  350.         EndWait
  351.         Debug-Output "Registry error: add software components"
  352.         CloseRegKey $(KeyProduct)
  353.         CloseRegKey $(SoftNetRulesKey)
  354.         goto fatalregistry
  355.        endif
  356.        set NewValueList = {{SoftwareType,$(NoTitle),$(!REG_VT_SZ),$(SoftwareType)},+
  357.                    {MajorVersion,$(NoTitle),$(!REG_VT_DWORD),$(ProductMajorVersion)},+
  358.                    {MinorVersion,$(NoTitle),$(!REG_VT_DWORD),$(ProductMinorVersion)},+
  359.                    {Title,$(NoTitle),$(!REG_VT_SZ),$(ProductSoftwareTitle)},+
  360.                    {Description,$(NoTitle),$(!REG_VT_SZ),$(ProductSoftwareDescription)},+
  361.                    {ServiceName,$(NoTitle),$(!REG_VT_SZ),$(ProductSoftwareName)},+
  362.                    {InstallDate,$(NoTitle),$(!REG_VT_DWORD),*($(Now),1)}}
  363.        Shell  $(UtilityInf), AddValueList, $(KeyProduct), $(NewValueList)
  364.        ifint $($ShellCode) != $(!SHELL_CODE_OK)
  365.         Debug-Output "ShellCode error."
  366.         goto ShellCodeError
  367.        endif
  368.        set RegistryErrorIndex = $($R0)
  369.        Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  370.         EndWait
  371.         Debug-Output "Registry error: add value list."
  372.         CloseRegKey $(KeyProduct)
  373.         CloseRegKey $(SoftNetRulesKey)
  374.         goto fatalregistry
  375.        endif
  376.        set NewValueList = {{type,$(NoTitle),$(!REG_VT_SZ),$(NetRuleSoftwareType)},+
  377.                         {use,$(NoTitle),$(!REG_VT_SZ),$(NetRuleSoftwareUse)}, +
  378.                         {bindform,$(NoTitle),$(!REG_VT_SZ),$(NetRuleSoftwareBindForm)}, +
  379.                         {class,$(NoTitle),$(!REG_VT_MULTI_SZ),$(NetRuleSoftwareClass)}, +
  380.                         {bindable,$(NoTitle),$(!REG_VT_MULTI_SZ),$(NetRuleSoftwareBindable)}, +
  381.                         {InfOption,$(NoTitle),$(!REG_VT_SZ),$(Option)}}
  382.        Shell  $(UtilityInf), AddValueList, $(SoftNetRulesKey), $(NewValueList)
  383.        ifint $($ShellCode) != $(!SHELL_CODE_OK)
  384.         Debug-Output "ShellCode error."
  385.         goto ShellCodeError
  386.        endif
  387.        set RegistryErrorIndex = $($R0)
  388.        CloseRegKey $(KeyProduct)
  389.        CloseRegKey $(SoftNetRulesKey)
  390.        Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  391.         EndWait
  392.         Debug-Output "Resgitry error: add value list."
  393.         goto fatalregistry
  394.        endif
  395.     endif
  396.     Shell $(UtilityInf), AddHardwareComponent, $(ProductHardwareName),$(STF_CONTEXTINFNAME),$(ProductKeyName)
  397.     ifint $($R4) != -1
  398.                 Set OEM_ABANDON_OPTIONS = >($(OEM_ABANDON_OPTIONS), $(!NTN_SoftwareBase)"\Microsoft\Windows NT\CurrentVersion\NetworkCards\"$($R4))
  399.     endif
  400.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  401.                 Debug-Output "Cannot add hardware component"
  402.                 goto ShellCodeError
  403.     endif
  404.     set RegistryErrorIndex = $($R0)
  405.     Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  406.                 EndWait
  407.                 Debug-Output "Registry error: add hardware component"
  408.                 CloseRegKey $($R1)
  409.                 CloseRegKey $($R2)
  410.                 CloseRegKey $($R3)
  411.                 goto fatalregistry
  412.     endif
  413.     set KeyParameters = $($R3)
  414.     set KeyAdapterRules = $($R2)
  415.     set AdapterNumber = $($R4)
  416.     set NewValueList = {{Manufacturer,$(NoTitle),$(!REG_VT_SZ),$(Manufacturer)},+
  417.                        {Title,$(NoTitle),$(!REG_VT_SZ),"["$($R4)"] "$(ProductHardware$(Option)Title)},+
  418.                        {Description,$(NoTitle),$(!REG_VT_SZ),$(ProductHardware$(Option)Description)},+
  419.                        {ProductName,$(NoTitle),$(!REG_VT_SZ),$(ProductHardwareName)},+
  420.                        {ServiceName,$(NoTitle),$(!REG_VT_SZ),$($R5)},+
  421.                        {InstallDate,$(NoTitle),$(!REG_VT_DWORD),*($(Now),1)}}
  422.     Shell  $(UtilityInf), AddValueList, $($R1), $(NewValueList)
  423.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  424.                 Debug-Output "ShellCode error"
  425.                 goto ShellCodeError
  426.     endif
  427.     CloseRegKey $($R1)
  428.     set TempProdName = """"$(ProductHardwareName)$(AdapterNumber)""""
  429.     set TempBindForm = $(TempProdName)$(NetRuleHardwareBindForm)
  430.     set NewValueList = {{type,$(NoTitle),$(!REG_VT_SZ),$(NetRuleHardwareType)},+
  431.                         {bindform,$(NoTitle),$(!REG_VT_SZ),$(TempBindForm)}, +
  432.                         {class,$(NoTitle),$(!REG_VT_MULTI_SZ),$(NetRuleHardwareClass)}, +
  433.                         {InfOption,$(NoTitle),$(!REG_VT_SZ),$(Option)}}
  434.     Shell  $(UtilityInf), AddValueList, $(KeyAdapterRules), $(NewValueList)
  435.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  436.                 Debug-Output "ShellCode error."
  437.                 goto ShellCodeError
  438.     endif
  439.     set RegistryErrorIndex = $($R0)
  440.     Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  441.                 EndWait
  442.                 Debug-Output "Resgitry error: add value list."
  443.                 CloseRegKey $(KeyParameters)
  444.                 CloseRegKey $(KeyAdapterRules)
  445.                 goto fatalregistry
  446.     endif
  447.     CloseRegKey $(KeyAdapterRules)
  448.     goto writeparameters
  449. writeparameters = +
  450.     set IRQValue = *($(IRQValues), ~($(IRQList),$(IRQValueIndex)))
  451.     set IOBaseAddrValue = *($(IOBaseAddrValues), ~($(IOBaseAddrList),$(IOBaseAddrIndex)))
  452.     set NewValueList = {{InterruptNumber,$(NoTitle),$(!REG_VT_DWORD),$(IRQValue)},+
  453.                        {BusType,$(NoTitle),$(!REG_VT_DWORD),1},+
  454.                        {BusNumber,$(NoTitle),$(!REG_VT_DWORD),0},+
  455.                        {MediaType,$(NoTitle),$(!REG_VT_DWORD),1},+
  456.                        {IoBaseAddress,$(NoTitle),$(!REG_VT_DWORD),$(IOBaseAddrValue)}}
  457.     Shell  $(UtilityInf), AddValueList, $(KeyParameters), $(NewValueList)
  458.     ifstr(i) $(!STF_GUI_UNATTENDED) == "YES"
  459.         Shell $(UtilityInf),AddDefaultNetCardParameters,$(KeyParameters)
  460.     endif
  461.     CloseRegKey $(KeyParameters)
  462.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  463.                 Debug-Output "ShellCode error."
  464.                 goto ShellCodeError
  465.     endif
  466.     set RegistryErrorIndex = $($R0)
  467.     Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  468.                 Debug-Output "Registry error: Add value list"
  469.                 goto fatalregistry
  470.     endif
  471.     EndWait
  472.     goto successful
  473. bindingadapter =+
  474.     set Error = "Binding: Sorry, not yet implemented."
  475.     goto fatal
  476. removeadapter = +
  477.     Ifstr(i) $(ProductKeyName) == $(!NTN_RegBase)
  478.                 Shell $(UtilityInf), RemoveSoftwareComponent, $(Manufacturer), +
  479.                                 $(ProductSoftwareName)
  480.                 ifint $($ShellCode) != $(!SHELL_CODE_OK)
  481.                                 Debug-Output "ShellCode error"
  482.                                 goto ShellCodeError
  483.                 endif
  484.                 set RegistryErrorIndex = $($R0)
  485.                 Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  486.                                 goto fatalregistry
  487.                 endif
  488.     else
  489.                 Shell $(UtilityInf), RemoveHardwareComponent, $(Manufacturer), +
  490.                         $(ProductSoftwareName), $(!NTN_RegBase)
  491.                 ifint $($ShellCode) != $(!SHELL_CODE_OK)
  492.                                 Debug-Output "ShellCode error"
  493.                                 goto ShellCodeError
  494.                 endif
  495.                 set RegistryErrorIndex = $($R0)
  496.                 Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  497.                                 goto fatalregistry
  498.                 endif
  499.     endif
  500.     goto end
  501. UpgradeSoftware = +
  502.     OpenRegKey $(!REG_H_LOCAL) "" $(ProductKeyName) $(MAXIMUM_ALLOWED) KeyProduct
  503.     Ifstr $(KeyProduct) != $(KeyNull)
  504.         install "Install-Update"
  505.         ifstr(i) $(STF_INSTALL_OUTCOME) != STF_SUCCESS
  506.             goto fatal
  507.         endif
  508.         SetRegValue $(KeyProduct) {MajorVersion,$(NoTitle),$(!REG_VT_SZ),$(ProductMajorVersion)}
  509.         SetRegValue $(KeyProduct) {MinorVersion,$(NoTitle),$(!REG_VT_SZ),$(ProductMinorVersion)}
  510.         CloseRegKey $(KeyProduct)
  511.     else
  512.         goto fatalregistry
  513.     endif
  514.     goto end
  515. successful = +
  516.     goto end
  517. abandon = +
  518.     ForListDo $(OEM_ABANDON_OPTIONS)
  519.         Shell $(UtilityInf), RemoveHardwareComponent, $(Manufacturer), +
  520.             $(ProductSoftwareName), $($)
  521.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  522.             Debug-Output "ShellCode error"
  523.             goto ShellCodeError
  524.         endif
  525.         set RegistryErrorIndex = $($R0)
  526.         Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  527.             goto fatalregistry
  528.         endif
  529.     EndForListDo
  530.     Ifstr(i) $(OEM_ABANDON_SOFTWARE) == TRUE
  531.         Shell $(UtilityInf), RemoveSoftwareComponent, $(Manufacturer), +
  532.             $(ProductSoftwareName), FALSE
  533.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  534.             Debug-Output "ShellCode error"
  535.             goto ShellCodeError
  536.         endif
  537.         set RegistryErrorIndex = $($R0)
  538.         Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  539.             goto fatalregistry
  540.         endif
  541.     endif
  542.     goto end
  543. warning = +
  544.     Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), "WARNING", $(Error)
  545.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  546.         goto ShellCodeError
  547.     endif
  548.     ifstr(i) $($R1) == "OK"
  549.         goto $(to)
  550.     else-ifstr(i) $($R1) == "CANCEL"
  551.         goto $(from)
  552.     else
  553.         goto "end"
  554.     endif
  555. nonfatalinfo = +
  556.     Set CommonStatus = STATUS_USERCANCEL
  557.     Set Severity = STATUS
  558.     goto nonfatalmsg
  559. nonfatal = +
  560.     Set Severity = NONFATAL
  561.     goto nonfatalmsg
  562. nonfatalmsg = +
  563.     ifstr(i) $(Error) == ""
  564.         Set Severity = NONFATAL
  565.         Shell $(UtilityInf) RegistryErrorString "SETUP_FAIL"
  566.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  567.             goto ShellCodeError
  568.         endif
  569.         set Error = $($R0)
  570.     endif
  571.     Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), $(Severity), $(Error)
  572.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  573.         goto ShellCodeError
  574.     endif
  575.     ifstr(i) $($R1) == "OK"
  576.         goto $(from)
  577.     else
  578.         goto "end"
  579.     endif
  580. fatalregistry = +
  581.     Shell $(UtilityInf) RegistryErrorString $(RegistryErrorIndex)
  582.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  583.         goto ShellCodeError
  584.     endif
  585.     set Error = $($R0)
  586.     goto fatal
  587. fataldetect = +
  588.     Shell $(UtilityInf),RegistryErrorString,CANNOT_DETECT
  589.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  590.         Debug-Output "ShellCode error: cannot get an error string."
  591.         goto ShellCodeError
  592.     endif
  593.     set Error = $($R0)
  594.     Goto fatal
  595. fatal = +
  596.     ifstr(i) $(Error) == ""
  597.         Shell $(UtilityInf) RegistryErrorString "SETUP_FAIL"
  598.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  599.             goto ShellCodeError
  600.         endif
  601.         set Error = $($R0)
  602.     endif
  603.     Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), "FATAL", $(Error)
  604.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  605.         goto ShellCodeError
  606.     endif
  607.     goto setfailed
  608. ShellCodeError = +
  609.     set DlgType      = "MessageBox"
  610.     set STF_MB_TITLE = $(ShellCodeErrorTitle)
  611.     set STF_MB_TEXT  = $(ShellCodeErrorText)
  612.     set STF_MB_TYPE  = 1
  613.     set STF_MB_ICON  = 3
  614.     set STF_MB_DEF   = 1
  615.     ui start "Error Message"
  616.     goto setfailed
  617. setfailed = +
  618.     set CommonStatus = STATUS_FAILED
  619.     ifstr(i) $(OEM_ABANDON_ON) == TRUE
  620.         set OEM_ABANDON_ON = FALSE
  621.         goto abandon
  622.     endif
  623.     goto end
  624. end = +
  625.     goto term
  626. term = +
  627.     Return $(CommonStatus)
  628.  
  629. [Install-Option]
  630.     set STF_VITAL = ""
  631.     ifstr(i) $(AddCopy) == "YES"
  632.         AddSectionFilesToCopyList Files-NE2000 $(SrcDir) $(!STF_WINDOWSSYSPATH)\drivers
  633.     endif
  634.     ifstr(i) $(DoCopy) == "YES"
  635.        set !STF_NCPA_FLUSH_COPYLIST = TRUE
  636.        CopyFilesInCopyList
  637.     endif
  638.     ifstr(i) $(DoConfig) == "YES"
  639.     endif
  640.     Exit
  641. [Install-Update]
  642.    set STF_VITAL        = ""
  643.    set STF_OVERWRITE    = "VERIFYSOURCEOLDER"
  644.    AddSectionFilesToCopyList Files-NE2000 $(SrcDir) $(!STF_WINDOWSSYSPATH)\drivers
  645.    exit
  646. [Install-Help]
  647.    set STF_VITAL        = ""
  648.    AddSectionFilesToCopyList Files-Help $(SrcDir) $(!STF_WINDOWSSYSPATH)
  649.    set !STF_NCPA_FLUSH_COPYLIST = TRUE
  650.    CopyFilesInCopyList
  651.    exit
  652.  
  653. [Source Media Descriptions]
  654.     1 = "Windows NT Workstation DRVLIB"
  655.     2 = "Windows NT Workstation CD-ROM" , TAGFILE = cdrom.w
  656.  
  657. [Signature]
  658.     FileType = MICROSOFT_DRVLIB_FILE
  659. [GetSignature]
  660.     read-syms Signature
  661.     return $(FileType)
  662.  
  663. [ProductType]
  664. STF_PRODUCT  = Winnt
  665. STF_PLATFORM = I386
  666.  
  667. [Files-Inf]
  668. 1,    oemsetup.inf,     SIZE=1000,    RENAME=$(!UG_Filename)
  669.  
  670. [Files-Help]
  671. 1,      NE2KISA.HLP ,     SIZE=999
  672.  
  673. [Files-NE2000]
  674. 2,      NE2000.SYS ,     SIZE=999
  675.  
  676. [LanguagesSupported]
  677.     ENG
  678.  
  679. [DialogConstantsENG]
  680. Help        = "&Help"
  681. Exit        = "Cancel"
  682. OK          = "OK"
  683. HelpContext = ""
  684. Continue    = "Continue"
  685. Cancel      = "Cancel"
  686.  
  687. [FileDependentDlgENG]
  688. Label1 = "&IRQ Level:"
  689. Label2 = "I/O &Port Address:"
  690. DlgType = "RadioCombination"
  691. DlgTemplate = "NE2000"
  692. Caption = $(FunctionTitle)
  693. Combo1List = $(IRQList)
  694. Combo1Out  = $(IRQValue)
  695. Combo2List = $(IOBaseAddrList)
  696. Combo2Out  = $(IOBaseAddrValue)
  697. ComboListItemsIn  = {Combo1List, Combo2List}
  698. ComboListItemsOut = {Combo1Out, Combo2Out}
  699. EditTextIn = ""
  700. EditTextLim = ""
  701. CBOptionsGreyed = {}
  702. NotifyFields = {NO, NO}
  703. HelpContext = 100
  704.  
  705. [NE2000IRQChoices]
  706. IRQ_1 = "3",3
  707. IRQ_2 = "4",4
  708. IRQ_3 = "5",5
  709. IRQ_4 = "6",6
  710. IRQ_5 = "7",7
  711. IRQ_6 = "9",9
  712. IRQ_7 = "10",10
  713. IRQ_8 = "11",11
  714. IRQ_9 = "12",12
  715. IRQ_10 = "15",15
  716.  
  717. [NE2000IOBaseAddrChoices]
  718. IOBase_1  = "0x200",512
  719. IOBase_2  = "0x220",544
  720. IOBase_3  = "0x240",576
  721. IOBase_4  = "0x260",608
  722. IOBase_5  = "0x280",640
  723. IOBase_6  = "0x2A0",672
  724. IOBase_7  = "0x2C0",704
  725. IOBase_8  = "0x2E0",736
  726. IOBase_9  = "0x300",768
  727. IOBase_10  = "0x320",800
  728. IOBase_11  = "0x340",832
  729. IOBase_12  = "0x360",864
  730. IOBase_13  = "0x380",896
  731. IOBase_14  = "0x3A0",928
  732. IOBase_15  = "0x3C0",960
  733. IOBase_16  = "0x3E0",992